package com.jxw.launcher.util;

import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.google.android.exoplayer2.C;
import com.jxw.engine.platsign.MainActivity;
import com.jxw.launcher.MyApp;
import com.jxw.launcher.R;
import com.jxw.studyrecord.StudyRecordAPKInfo;

/* loaded from: classes.dex */
public class ApkJumpUtil {
    private static final String TAG = "ApkJumpUtil";

    public static void aiTiku(Context context, String str, int i, int i2, int i3) {
        if (!MyApp.getInstance().mBottomBtnOnClickListener.isAppInstalled(MyApp.getInstance(), StudyRecordAPKInfo.PACKAGE_SECOND_LINE_QA)) {
            MyApp.getInstance().mBottomBtnOnClickListener.onClick(context.getResources().getString(R.string.tag_args_tiku));
            return;
        }
        String string = context.getSharedPreferences(MainActivity.PREFERENCE, 0).getString("token", "");
        Log.e("lyx", "ApkJumpUtil-aiTiku-token-" + string);
        if (i != 1 && i != 2 && i != 3 && i == 4) {
        }
        Intent intent = new Intent();
        intent.setClassName(StudyRecordAPKInfo.PACKAGE_SECOND_LINE_QA, StudyRecordAPKInfo.CLASS_SECOND_LINE_QA);
        intent.putExtra("tiku_token", string);
        Log.i(TAG, "RegisLoginUtil aiTiku: " + string);
        intent.putExtra("tiku_func_type", i + "");
        intent.putExtra("tiku_period_type", i2 + "");
        intent.putExtra("tiku_select_subject", i3 + "");
        intent.addFlags(C.ENCODING_PCM_MU_LAW);
        Log.d("lyx", "subjectId-1-" + i3);
        try {
            context.startActivity(intent);
        } catch (Exception unused) {
            MyApp.getInstance().mBottomBtnOnClickListener.onClick(MyApp.getInstance().getString(R.string.tag_args_tiku));
        }
    }
}
